3.5 \(\int (a+a \sec (c+d x)) \sin (c+d x) \, dx\)

Optimal. Leaf size=26 \[ -\frac{a \cos (c+d x)}{d}-\frac{a \log (\cos (c+d x))}{d} \]

[Out]

-((a*Cos[c + d*x])/d) - (a*Log[Cos[c + d*x]])/d

________________________________________________________________________________________

Rubi [A]  time = 0.0306214, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.176, Rules used = {3872, 2707, 43} \[ -\frac{a \cos (c+d x)}{d}-\frac{a \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sec[c + d*x])*Sin[c + d*x],x]

[Out]

-((a*Cos[c + d*x])/d) - (a*Log[Cos[c + d*x]])/d

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rule 2707

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^(m - (p + 1)/2))/(a - x)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int (a+a \sec (c+d x)) \sin (c+d x) \, dx &=-\int (-a-a \cos (c+d x)) \tan (c+d x) \, dx\\ &=\frac{\operatorname{Subst}\left (\int \frac{-a+x}{x} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (1-\frac{a}{x}\right ) \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=-\frac{a \cos (c+d x)}{d}-\frac{a \log (\cos (c+d x))}{d}\\ \end{align*}

Mathematica [A]  time = 0.0185917, size = 37, normalized size = 1.42 \[ \frac{a \sin (c) \sin (d x)}{d}-\frac{a \cos (c) \cos (d x)}{d}-\frac{a \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sec[c + d*x])*Sin[c + d*x],x]

[Out]

-((a*Cos[c]*Cos[d*x])/d) - (a*Log[Cos[c + d*x]])/d + (a*Sin[c]*Sin[d*x])/d

________________________________________________________________________________________

Maple [A]  time = 0.02, size = 28, normalized size = 1.1 \begin{align*}{\frac{a\ln \left ( \sec \left ( dx+c \right ) \right ) }{d}}-{\frac{a}{d\sec \left ( dx+c \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sec(d*x+c))*sin(d*x+c),x)

[Out]

1/d*a*ln(sec(d*x+c))-1/d*a/sec(d*x+c)

________________________________________________________________________________________

Maxima [A]  time = 1.13873, size = 31, normalized size = 1.19 \begin{align*} -\frac{a \cos \left (d x + c\right ) + a \log \left (\cos \left (d x + c\right )\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(d*x+c))*sin(d*x+c),x, algorithm="maxima")

[Out]

-(a*cos(d*x + c) + a*log(cos(d*x + c)))/d

________________________________________________________________________________________

Fricas [A]  time = 1.76289, size = 59, normalized size = 2.27 \begin{align*} -\frac{a \cos \left (d x + c\right ) + a \log \left (-\cos \left (d x + c\right )\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(d*x+c))*sin(d*x+c),x, algorithm="fricas")

[Out]

-(a*cos(d*x + c) + a*log(-cos(d*x + c)))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a \left (\int \sin{\left (c + d x \right )} \sec{\left (c + d x \right )}\, dx + \int \sin{\left (c + d x \right )}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(d*x+c))*sin(d*x+c),x)

[Out]

a*(Integral(sin(c + d*x)*sec(c + d*x), x) + Integral(sin(c + d*x), x))

________________________________________________________________________________________

Giac [A]  time = 1.46129, size = 43, normalized size = 1.65 \begin{align*} -\frac{a \cos \left (d x + c\right )}{d} - \frac{a \log \left (\frac{{\left | \cos \left (d x + c\right ) \right |}}{{\left | d \right |}}\right )}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sec(d*x+c))*sin(d*x+c),x, algorithm="giac")

[Out]

-a*cos(d*x + c)/d - a*log(abs(cos(d*x + c))/abs(d))/d